Matthias Clasen [Wed, 29 May 2019 22:03:10 +0000 (22:03 +0000)]
widget: Stop setting root coords in events
Nothing should use them anymore.
Matthias Clasen [Wed, 29 May 2019 21:49:27 +0000 (17:49 -0400)]
win32: Stop using gdk_event_get_root_coords
It seems we want local coords here anyway.
Matthias Clasen [Wed, 29 May 2019 21:44:48 +0000 (17:44 -0400)]
menu: Remove global coordinates
This commit removes support for scrolling and
for the keep-up triangle from GtkMenu, and gets
rid of all use of global coordinates.
Benjamin Otte [Fri, 26 Apr 2019 15:50:44 +0000 (17:50 +0200)]
menu: Only set position in one place
Benjamin Otte [Wed, 24 Apr 2019 23:27:58 +0000 (01:27 +0200)]
menu: Simplify function
No need to do complicated math when we can just look at the allocation.
Benjamin Otte [Sun, 21 Apr 2019 13:50:24 +0000 (15:50 +0200)]
menuitem: Introduce gtk_menu_item_get_menu_shell()
Returns the parent menu shell or NULL.
Replace all calls to gtk_widget_get_parent() with this function.
Matthias Clasen [Fri, 31 May 2019 15:32:49 +0000 (15:32 +0000)]
Merge branch 'overlay-scrolling-setting' into 'master'
Overlay scrolling setting
See merge request GNOME/gtk!873
Matthias Clasen [Wed, 22 May 2019 19:34:46 +0000 (19:34 +0000)]
scrolled window: respect overlay-scrolling setting
If the gtk-overlay-scrolling setting is FALSE,
don't use overlay scrollbars.
Matthias Clasen [Wed, 22 May 2019 19:24:24 +0000 (19:24 +0000)]
Add a gtk-overlay-scrolling setting
This is in preparation for letting user opt out of
overlay scrolling in the control-center.
Matthias Clasen [Fri, 31 May 2019 10:57:27 +0000 (10:57 +0000)]
Merge branch 'wip/chergert/remove-cclosure' into 'master'
gtk: rely on default marshallers
See merge request GNOME/gtk!893
Benjamin Otte [Fri, 31 May 2019 04:07:11 +0000 (04:07 +0000)]
Merge branch 'for-master' into 'master'
For master
See merge request GNOME/gtk!892
Christian Hergert [Fri, 31 May 2019 03:56:50 +0000 (20:56 -0700)]
gtk: rely on default marshallers
Similar to previous removals of g_cclosure_marshal_VOID__VOID we can remove
other marshallers for which are a simple G_TYPE_NONE with single parameter.
In those cases, GLib will setup both a c_marshaller and va_marshaller for
us. Before this commit, we would not get a va_marshaller because the
c_marshaller is set.
Related to GNOME/Initiatives#10
Benjamin Otte [Fri, 31 May 2019 03:35:04 +0000 (05:35 +0200)]
widget: fix CSS transforms with margins
The CSS transform should operate on the border-box, not the margin box.
So we need to shrink the bounds by the margin before we apply the CSS
transform.
Benjamin Otte [Fri, 31 May 2019 03:23:42 +0000 (05:23 +0200)]
gtk-demo: Fix sliding puzzle demo
1. Menubuttons aren't buttons
2. For paintables without aspect ratios, use 1.0
Niels De Graef [Thu, 30 May 2019 18:49:48 +0000 (18:49 +0000)]
Merge branch 'wip/nielsdg/fix-gir-warnings' into 'master'
Fix some GObject introspection annotations
See merge request GNOME/gtk!891
Niels De Graef [Thu, 30 May 2019 15:05:02 +0000 (17:05 +0200)]
Fix some GObject introspection annotations
Fixes several warnings by the GIR compiler.
Matthias Clasen [Thu, 30 May 2019 12:24:18 +0000 (12:24 +0000)]
Add a testcase
This tests the fix in
1e7225aa1c20525da0.
Benjamin Otte [Thu, 30 May 2019 16:34:51 +0000 (18:34 +0200)]
build: Make script interpreter optional
Running the tests needs it though, so it's only optional without tests.
Benjamin Otte [Thu, 30 May 2019 16:26:32 +0000 (18:26 +0200)]
docs: Fix build
Benjamin Otte [Thu, 30 May 2019 15:48:02 +0000 (15:48 +0000)]
Merge branch 'cairo-script-interpreter' into 'master'
rendernodeparser: Parse cairo script
See merge request GNOME/gtk!876
Benjamin Otte [Wed, 29 May 2019 03:48:38 +0000 (05:48 +0200)]
rendernodeparser: Handle empty Cairo nodes
Cairo nodes can contain a NULL surface if they have never been drawn to.
Make this the default Cairo node.
Benjamin Otte [Tue, 28 May 2019 03:51:20 +0000 (05:51 +0200)]
rendernodeparser: Parse cairo script
Use cairo-script-interpreter to parse the scripts that generate cairo
nodes.
This requires libcairoscriptinterpreter.so to work properly, but if
it isn't found we disable this (unimportant for normal functioning)
code and just emits a parser warning.
The testsuite requires it however or it will fail.
A new test is included that tests all of this.
Matthias Clasen [Thu, 30 May 2019 12:19:08 +0000 (08:19 -0400)]
Remove leftover debug spew
Matthias Clasen [Thu, 30 May 2019 03:44:43 +0000 (03:44 +0000)]
Add gtknative.h to public headers
Matthias Clasen [Thu, 30 May 2019 11:56:05 +0000 (11:56 +0000)]
Merge branch 'lr/builder-tool-templates' into 'master'
builder-tool: Rewrite GtkBuilder templates too
See merge request GNOME/gtk!888
Matthias Clasen [Thu, 30 May 2019 11:48:59 +0000 (11:48 +0000)]
Merge branch 'lr/builder-tool-assistant-crash' into 'master'
builder-tool: Set the parent of newly created GtkAssistantPage
See merge request GNOME/gtk!890
Lubomir Rintel [Thu, 30 May 2019 09:29:50 +0000 (11:29 +0200)]
builder-tool: Set the parent of newly created GtkAssistantPage
...and its property. Otherwise simplify_element() blows up when looking
up the hierarchy to determine a property type.
$ gtk4-builder-tool simplify --3to4 /dev/stdin <<EOF
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- Generated with glade 3.20.2 -->
> <interface domain="nm-applet">
> <object class="GtkAssistant">
> <child>
> <object class="GtkBox" id="confirm_page">
> </object>
> <packing>
> <property name="page_type">confirm</property>
> <property name="complete">True</property>
> </packing>
> </child>
> </object>
> </interface>
> EOF
/dev/stdin: Packing property GtkAssistant::page_type not found
/dev/stdin: Packing property GtkAssistant::complete not found
Segmentation fault (core dumped)
Lubomir Rintel [Thu, 30 May 2019 07:20:52 +0000 (09:20 +0200)]
builder-tool: Rewrite GtkBuilder templates too
Timm Bäder [Thu, 30 May 2019 07:12:24 +0000 (09:12 +0200)]
gl renderer: Properly flip scaled fallback nodes
Fixes cairo nodes in hidpi setups
Matthias Clasen [Thu, 30 May 2019 03:28:41 +0000 (03:28 +0000)]
Merge branch 'wip/baedert/nodeeditor-fuckery' into 'master'
node editor: Add a quick way to save a testcase
See merge request GNOME/gtk!880
Matthias Clasen [Thu, 30 May 2019 03:26:59 +0000 (03:26 +0000)]
Merge branch 'wip/chergert/sysprof-3' into 'master'
profiler: port GdkProfiler to sysprof-3
See merge request GNOME/gtk!886
Christian Hergert [Thu, 30 May 2019 02:02:30 +0000 (19:02 -0700)]
profiler: port GdkProfiler to sysprof-3
This uses the new sysprof-3 ABI to implement the capture writer. It also
uses the statically linked libsysprof-capture-3.a that is provided with
Sysprof for the capture writing to ensure that we do not leak any symbols
nor depend on any additional libraries.
The GTK_TRACE_FD can be used to pass a FD for tracing into Gtk. Sysprof
uses this when the Gtk instrument is selected for recording.
Matthias Clasen [Wed, 29 May 2019 21:18:46 +0000 (21:18 +0000)]
Merge branch 'shortcuts-sizing' into 'master'
Fix shortcuts window sizing
Closes #11
See merge request GNOME/gtk!885
Matthias Clasen [Wed, 29 May 2019 21:06:27 +0000 (17:06 -0400)]
Fix shortcuts window sizing
We were deferring the reflow until map, but this
leads to the section initially having an enormous
height and the window picks up that size before
we have a chance to reflow, This could be seen
in the "Builder" demo in gtk4-demo.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/11
Christian Hergert [Wed, 29 May 2019 20:48:33 +0000 (13:48 -0700)]
marshallers: add missing g_cclosure_marshal_VOID__VOID fixes
Matthias Clasen [Wed, 29 May 2019 20:38:51 +0000 (20:38 +0000)]
Merge branch 'wip/chergert/marshal-gtk4' into 'master'
marshallers: ensure g_cclosure_marshal_VOID__VOIDv is used
See merge request GNOME/gtk!883
Christian Hergert [Wed, 29 May 2019 20:05:19 +0000 (13:05 -0700)]
marshallers: ensure g_cclosure_marshal_VOID__VOIDv is used
If we set c_marshaller manually, then g_signal_newv() will not setup a
va_marshaller for us. However, if we provide c_marshaller as NULL, it will
setup both the c_marshaller (to g_cclosure_marshal_VOID__VOID) and
va_marshaller (to g_cclosure_marshal_VOID__VOIDv) for us.
Matthias Clasen [Wed, 29 May 2019 18:39:09 +0000 (18:39 +0000)]
Merge branch 'gesture-click' into 'master'
Rename GtkGestureMultiPress to GtkGestureClick
See merge request GNOME/gtk!878
Timm Bäder [Wed, 29 May 2019 18:30:21 +0000 (20:30 +0200)]
node editor: Add a quick way to save a testcase
Matthias Clasen [Wed, 29 May 2019 18:29:57 +0000 (18:29 +0000)]
Merge branch 'global-coords' into 'master'
Drop global coordinates
See merge request GNOME/gtk!879
Matthias Clasen [Wed, 29 May 2019 18:17:07 +0000 (14:17 -0400)]
Mention event controller API in the migration guide
Matthias Clasen [Wed, 29 May 2019 18:11:57 +0000 (18:11 +0000)]
Mention global coordinates in the migration guide
Matthias Clasen [Wed, 29 May 2019 18:03:20 +0000 (18:03 +0000)]
Cosmetics
Remove a doc comment for no-longer-public api.
Matthias Clasen [Wed, 29 May 2019 17:35:29 +0000 (17:35 +0000)]
Cosmetics
Drop a leftover declaration.
Matthias Clasen [Wed, 29 May 2019 17:31:37 +0000 (17:31 +0000)]
Fix the win32 build
gdk_display_get_monitor_at_point was used
in this backend.
Matthias Clasen [Wed, 29 May 2019 15:26:51 +0000 (11:26 -0400)]
Cosmetics
Remove an unused variable.
Matthias Clasen [Wed, 29 May 2019 15:21:20 +0000 (15:21 +0000)]
Drop gdk_surface_move
And its cousin, gdk_surface_move_resize.
These APIs are expecting global coordinates,
which are going away. GTK is not using them
anymore.
Matthias Clasen [Wed, 29 May 2019 15:18:15 +0000 (15:18 +0000)]
Remove a misleading comment
We don't have windowed widgets anymore, and
gdk_surface_move_resize is about to go away.
Matthias Clasen [Wed, 29 May 2019 15:16:39 +0000 (15:16 +0000)]
window: Remove move unused fields
position_constraints_changed is never used.
Matthias Clasen [Wed, 29 May 2019 15:12:34 +0000 (15:12 +0000)]
window: Never call gdk_surface_move
With gtk_window_set_position gone, we should never
come up with a new position to set in this code.
Leave a warning in place and remove the gdk_surface_move
calls.
Matthias Clasen [Wed, 29 May 2019 14:50:30 +0000 (10:50 -0400)]
Drop an empty function
gtk_window_constrain_position is not doing anything
anymore, so no need to call it.
Matthias Clasen [Wed, 29 May 2019 14:21:57 +0000 (14:21 +0000)]
window: Drop more unused fields
need_default_position is never used.
Matthias Clasen [Wed, 29 May 2019 14:17:38 +0000 (14:17 +0000)]
window: Drop some unused fields
initial_x/y and initial_pos_set are never used.
Matthias Clasen [Wed, 29 May 2019 11:44:17 +0000 (07:44 -0400)]
Drop gdk_device_get_position
Root coordinates are going away, so this
api does not make sense anymore. Use
gdk_surface_get_device_position instead.
We still keep this as internal api for
root-coordinate using backends.
Matthias Clasen [Wed, 29 May 2019 11:43:29 +0000 (07:43 -0400)]
widget: Stop using gdk_device_get_position
Root coordinates are going away. Stop
setting them in crossing events, so we
can drop this api.
Matthias Clasen [Wed, 29 May 2019 06:05:40 +0000 (02:05 -0400)]
Make gdk_surface_get_origin internal
We still use this function inside gdk in
a number of places, so keep it around.
Matthias Clasen [Wed, 29 May 2019 05:50:48 +0000 (05:50 +0000)]
Drop gdk_display_get_monitor_at_point
This api expects global coordinates, and
is unused.
Matthias Clasen [Wed, 29 May 2019 05:34:46 +0000 (05:34 +0000)]
window: Drop gtk_window_set_position
This is heavily using global coordinates, and
can't be guaranteed to work across wms / platforms.
Matthias Clasen [Wed, 29 May 2019 05:34:16 +0000 (05:34 +0000)]
tests: Stop using gtk_window_set_position
This api is going away.
Matthias Clasen [Wed, 29 May 2019 05:33:39 +0000 (05:33 +0000)]
gtk-demo: Stop using gtk_window_set_position
This api is going away.
Matthias Clasen [Wed, 29 May 2019 04:53:10 +0000 (00:53 -0400)]
Drop gdk_surface_get_frame_extents
No longer used.
Matthias Clasen [Wed, 29 May 2019 04:43:04 +0000 (04:43 +0000)]
a11y: Stop using gdk_surface_get_frame_extnts
This api is going away.
Matthias Clasen [Wed, 29 May 2019 04:31:04 +0000 (00:31 -0400)]
x11: Set surface position correctly
The X backend was storing global coordinates
in surface->x/y, and keeping the parent-relative
positions in its own fields. Switch this around
to store the relative position in x/y, as is
expected by the frontend.
Matthias Clasen [Wed, 29 May 2019 04:30:03 +0000 (00:30 -0400)]
Clarify gdk_surface_get_position
This function returns the position relative to
the surface parent, so will always return 0 for
non-popups. The out arguments don't need to
allow-none either - nobody passes NULL for these.
Matthias Clasen [Wed, 29 May 2019 03:55:46 +0000 (23:55 -0400)]
a11y: Stop using gdk_surface_get_origin
Global coordinates are going away.
Stop supporting ATK_XY_SCREEN.
Matthias Clasen [Wed, 29 May 2019 03:43:05 +0000 (23:43 -0400)]
main: Use gdk_surface_translate_coordinates
This gets rid of another use of global coordinates.
Matthias Clasen [Wed, 29 May 2019 03:41:56 +0000 (23:41 -0400)]
surface: Add coordinate translation
We maintain offsets for popups, so we can translate
coordinates between surfaces that are attached directly
or indirectly to the same toplevel. Add an api for that.
Matthias Clasen [Wed, 29 May 2019 17:49:06 +0000 (17:49 +0000)]
Merge branch 'high-contrast-tabs' into 'master'
HighContrast: Improve contrast of notebook tabs
See merge request GNOME/gtk!877
Matthias Clasen [Wed, 29 May 2019 17:10:46 +0000 (17:10 +0000)]
Rename GtkGestureMultiPress to GtkGestureClick
The name just made it hard for people to find the
right gesture to use.
Colomban Wendling [Wed, 29 May 2019 15:46:41 +0000 (17:46 +0200)]
HighContrast: Improve contrast of notebook tabs
Matthias Clasen [Wed, 29 May 2019 15:05:06 +0000 (15:05 +0000)]
testgtk: Fix a crash
Somebody forgot to update the signal handler
here when changing the size-allocate signal.
Benjamin Otte [Wed, 29 May 2019 14:51:42 +0000 (16:51 +0200)]
Revert "window: Chain up in show/hide"
This reverts commit
863f4d13ff4b46c55ff2111958ca2629c95caf99.
Benjamin Otte [Wed, 29 May 2019 14:33:45 +0000 (16:33 +0200)]
window: Chain up in show/hide
Benjamin Otte [Wed, 29 May 2019 14:31:14 +0000 (16:31 +0200)]
widget: Add marshallers to signals
Yay for better sysprof logs!
Benjamin Otte [Wed, 29 May 2019 13:02:49 +0000 (15:02 +0200)]
widget: Do proper clean up in real_hide()
Do the same things set_visible_flag() does.
Benjamin Otte [Wed, 29 May 2019 13:07:54 +0000 (15:07 +0200)]
widget: Move functions around
Copy them further up so that we can use them there in the next commit.
Benjamin Otte [Wed, 29 May 2019 13:01:18 +0000 (15:01 +0200)]
widget: Insist on proper vfunc calling
Insist that ->show() is only called for invisible and ->hide only for
visible widgets.
Benjamin Otte [Wed, 29 May 2019 12:48:27 +0000 (14:48 +0200)]
widget: Fix transform refcounting in allocate()
Make the transform (transfer full).
1. This makes sure we actually reference the transform. Previously we
did not.
2. Most callers create a new transform to pass to us. Now they don't
have to uref it anymore.
Benjamin Otte [Wed, 29 May 2019 12:29:25 +0000 (14:29 +0200)]
css: Use %f, not %.17f
The testusite failures explain why:
We don't want to print "1.
00000000000000000", but "1".
Benjamin Otte [Wed, 29 May 2019 03:55:28 +0000 (05:55 +0200)]
rendernodeparser: Handle repeating linear gradients
Just handle them like regular gradients, only name them differently.
Benjamin Otte [Wed, 29 May 2019 04:48:03 +0000 (06:48 +0200)]
css: Don't print numbers with exponent
CSS does not do exponents, so printing numbers close to 0 as 1.234e-15
does not work.
Also up the accuracy to 17 digits because that's what everyone else
uses.
Benjamin Otte [Wed, 29 May 2019 03:41:53 +0000 (05:41 +0200)]
broadway: Handle Cairo nodes with NULL surfaces
Matthias Clasen [Wed, 29 May 2019 03:18:26 +0000 (03:18 +0000)]
notebook: Drop position from ::create-window
Global coordinates are going away.
Matthias Clasen [Wed, 29 May 2019 03:07:02 +0000 (03:07 +0000)]
Some entry completion fixes
This gets popover-based entry completion closer
to working as expected. And it drops a use of
gdk_surface_get_origin.
Matthias Clasen [Wed, 29 May 2019 02:23:08 +0000 (22:23 -0400)]
tree models: Use standard padding
Matthias Clasen [Wed, 29 May 2019 01:42:38 +0000 (21:42 -0400)]
treeview column: Make final
Matthias Clasen [Wed, 29 May 2019 01:42:38 +0000 (21:42 -0400)]
treeview: Make final
Make GtkTreeSelection final as well.
Matthias Clasen [Wed, 29 May 2019 00:01:03 +0000 (20:01 -0400)]
flow box: Make final
We keep GtkFlowBoxChild subclassable, though.
Matthias Clasen [Wed, 29 May 2019 00:00:40 +0000 (20:00 -0400)]
listbox Make final
We keep GtkListBoxRow subclassable, though.
Matthias Clasen [Tue, 28 May 2019 23:53:56 +0000 (23:53 +0000)]
notebook: Make final
Matthias Clasen [Tue, 28 May 2019 23:45:45 +0000 (19:45 -0400)]
label: Make final
Matthias Clasen [Tue, 28 May 2019 23:43:43 +0000 (19:43 -0400)]
menubar: Make final
Matthias Clasen [Tue, 28 May 2019 23:37:51 +0000 (23:37 +0000)]
toolbar: make final
Matthias Clasen [Tue, 28 May 2019 23:37:31 +0000 (23:37 +0000)]
menu: Make final
Matthias Clasen [Tue, 28 May 2019 23:30:02 +0000 (23:30 +0000)]
Forgotten file
Matthias Clasen [Tue, 28 May 2019 22:58:58 +0000 (18:58 -0400)]
menu tool button: Make final
Matthias Clasen [Tue, 28 May 2019 22:58:46 +0000 (18:58 -0400)]
radio tool button: Make final
Matthias Clasen [Tue, 28 May 2019 22:58:31 +0000 (18:58 -0400)]
toggle tool button: Use standard padding
Matthias Clasen [Tue, 28 May 2019 22:58:05 +0000 (18:58 -0400)]
tool button: Use standard padding
Matthias Clasen [Tue, 28 May 2019 22:50:08 +0000 (22:50 +0000)]
iconview: Make final